<!DOCTYPE html>
<html lang="en">
<head>
    <title>登录</title>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <link rel="stylesheet" href="__CSS__/bootstrap.1.0.min.css" />
    <link rel="stylesheet" href="__CSS__/font-awesome-4.4.0/font-awesome.min.css" />
    <link rel="stylesheet" href="__CSS__/unicorn.login.min.css" />
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /></head>
<body>
<div id="logo">
    <img src="__IMG__/login-logo.png" alt="" />
    <!--<img src="" alt="" style=""/>-->
</div>
<div id="loginbox">
    <form id="loginform" class="form-vertical" method="post" action="{:url('Login/doLogin')}" />
        <p></p>
        <div class="control-group">
            <div class="controls">
                <div class="input-prepend">
                    <span class="add-on"><i class="fa fa-user"></i></span>
                    <input type="text" name="account" placeholder="账号" />
                </div>
            </div>
        </div><br>
        <div class="control-group">
            <div class="controls">
                <div class="input-prepend">
                    <span class="add-on"><i class="fa fa-lock"></i></span>
                    <input type="password" name="password" placeholder="密码" />
                </div>
            </div>
        </div><br>
        <div class="control-group">
            <div class="controls">
                <div class="input-prepend">
                    <span class="add-on"><i class="fa fa-tag"></i></span>
                    <input type="text" class="verify" name="verify" placeholder="验证码" />
                    <!--<img class="verifyimg reloadverify" alt="点击切换" width="100" src="">-->
                </div>
            </div>
        </div><br>
        <div class="control-group">
            <div class="controls">
                <div class="input-prepend">
                    <img class="verify-img reload-verify" alt="点击切换" width="250" src="">
                </div>
            </div>
        </div>
        <div class="control-group" style="height:20px;">
            <div class="controls">
                <div class="alert top-alert" style="display:none;width:87%">
                    <button class="close" data-dismiss="alert"></button>
                    <strong>错误!</strong>
                </div>
            </div>
        </div>
        <div class="form-actions">
            <span class="pull-left"><a href="#" class="flip-link" id="to-recover"></a></span>
            <span class="pull-right"><button class="btn btn-inverse ajax-post" type="submit" target-form="form-vertical">登录</button></span>
        </div>
    </form>
</div>
<script src="__STATIC__/jquery.min.js"></script>
<script src="__JS__/common.js"></script>
<script>
    $(function() {
        $("input[name='account']").focus();
        //刷新验证码
        $(".reload-verify").click(function () { reVerify(); });
    });
    function reVerify(){
        var src = $(".verify-img").attr("src");
        if (src.indexOf('?') > 0) {
            $(".verify-img").attr("src", src + '&random=' + Math.random());
        } else {
            $(".verify-img").attr("src", src.replace(/\?.*$/, '') + '?' + Math.random());
        }
    }
    function afterPost() { reVerify(); }
</script>
</body>
</html>